Scroll to navigation

PCP2GRAPHITE(1) General Commands Manual PCP2GRAPHITE(1)

NAME

pcp2graphite - pcp-to-graphite metrics exporter

SYNOPSIS

pcp2graphite [-h hostspec] [-a archive] [-L] [-O origin] [-T finish] [-s samples] [-t delta] [-g graphitehost] [-p pickleport] [-P textport] [-u units] [-m prefix] metricname ...

DESCRIPTION

pcp2graphite is a PCP metric exporter. It relays hierarchies of the pmns(5) to a designated Graphite (Carbon/Whisper) database by periodically polling, then copying/converting relevant numerical metrics across the Graphite "text" or "pickled" TCP protocols. Metric values are optionally scaled to a given unit/scale, but are not rate-converted. Metric names may be prefixed and are somewhat canonicalized to fit the Graphite namespace rules.

The data transfer will continue on a best-effort basis until the program is interrupted. Temporary errors are ignored. Multiple copies of this program may be run in parallel, to populate different Graphite databases or subtrees, with different scaling or sampling intervals.

OPTIONS

Extract metrics from the specified pmcd(1) daemon, using a host specification as described on PCPIntro(1). The default is local:.
Extract metrics from given archive.
Extract metrics from the local context PCP PMDAs.
Specify the polling interval in seconds. If live, polling is aligned to natural multiples of this interval. The default is 60 seconds.
Set the time origin for archive scanning. The default is the start of the archive.
Set the time finish for archive scanning. The default is the end of the archive.
Set the maximum number of samples to relay. The default is unlimited.
Specify the graphite carbon-cache server where the relayed data is to be relayed. The default is localhost.
Select the more efficient "pickled" encoding for carbon-cache communication, and use the given TCP port. This is the default, using port 2004.
Alternately, select the less efficient "text" encoding for carbon-cache communication, and use the given TCP port. This protocol is not default, because it requires a separate TCP connection for each metric. The typical port is 2003.
Rescale the metrics to the given UNITS string, as parsed by the pmParseUnitsStr(3) function. This must be dimensionally consistent with the underlying PCP metric. The default is to perform no scaling.
Use the given string as a prefix for all PMNS metrics relayed to Graphite. The default is pcp. (note the period at the end).
Relay all numeric metrics nested at or below the given name in the PMNS. This option may be repeated. This is a compulsory option, having no default.

DAEMON SETUP

An example of a Linux systemd(1) service file that can be used to have systemd managing a single instance of pcp2graphite follows:

[Unit]
Description=Performance Co-Pilot data pump to Graphite
Documentation=man:pcp2graphite(1)
After=pmcd.service
[Service]
ExecStart=/usr/bin/pcp2graphite <OPTIONS>
[Install]
WantedBy=multi-user.target

SEE ALSO

PCPIntro(1), pmcd(1), systemd(1), pmParseUnitsStr(3), http://graphite.wikidot.com/, pmval(1), PMAPI(3), pcp.conf(5) and pmns(5).

PCP Performance Co-Pilot